const { defineConfig } = require('@vue/cli-service')
const path = require('path');

module.exports = defineConfig({
  publicPath: '/',
  transpileDependencies: true,
  lintOnSave: false,
  devServer: {
    proxy: {
            '/api': {
                target: process.env.VUE_APP_API_URL,
                pathRewrite:{ '^/api':''}
            },
        }
    },
  configureWebpack: {
    devtool: 'source-map',
    resolve :{
      // 配置 @别名路径
      alias: {
        '@': path.resolve(__dirname,'./src') 
      }
    }
  }
})